package com.ada.demo

class ClassTest {

}

class Person {
  var age: Int = 10
  var sal = 8090.9
  var Name = null
  var address: String = null
}

trait Logger {
  def log(msg: String)
}

class Console extends Logger with Cloneable with Serializable {
  def log(msg: String) {
    println(msg)
  }
}

trait Operate3 {
  def insert(id: Int): Unit = {
    println("插入数据 = " + id)
  }
}

class OracleDB {
}

abstract class MySQL3 {
}

object Main {
  def main(args: Array[String]): Unit = {
    var oracle = new OracleDB with Operate3
    oracle.insert(999)
    val mysql = new MySQL3 with Operate3
    mysql.insert(4)
  }
}